<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="bean.*"%>
<%@page import="DAO.*"%>
<%@page import="service.*"%>
<%@page import="servlet.*"%>
 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>更新宠物</title>
    <style>
    	   
    input{
          -webkit-appearance: none;
          -moz-appearance: none;
          appearance:none ;
         text-align: center;
         height: 36px;
          width: 248px;
          border-radius: 15px;
          border: 0px solid #fff;
         padding:0 8px;
         outline: 0;
         letter-spacing: 1px;
         color:black;
         font-weight: 600;
         background: rgba(45,45,45,.10);/*半透明背景色*/
         border: 1px solid rgba(255,255,255,.15);
        box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
        text-shadow: 0 1px 2px rgba(0,0,0,.1);
         -o-transition: all .2s;
        -moz-transition: all .2s;
         -webkit-transition: all .2s;
        -ms-transition: all .2s;
}
        input:focus{
          box-shadow:0 0 5px 4px rgba(0, 0, 0,0.1);
     }
      input::-webkit-input-placeholder{ /*WebKit browsers*/
          color: rgba(255,255,255,0.8);
      }
  
      input::-moz-input-placeholder{ /*Mozilla Firefox*/
          color: rgba(255,255,255,0.8);
      }
  
      input::-ms-input-placeholder{ /*Internet Explorer*/ 
         color: rgba(255,255,255,0.8);
   }
    </style>
  </head> 
  <%
  request.setCharacterEncoding("utf-8");
  response.setContentType("text/html;charset=utf-8");
  
  int id =Integer.parseInt(request.getParameter("id"));
 
  Petbean p = new Petbean();
  p.setId(id);
  
  IPetDao dao = DaoFactory.getProductDao();
  p=dao.queryById(p);
  
  %>
  
  <body>
   	<center>
   	<h2>更新宠物信息</h2>
   	 <form action="OperatorServlet?op=update" method="post">
   	 	<table border="0" >
   	 		<tr>
   	 			<td>宠物编号</td>
   	 			<td>
   	 			<input type="text" name="id" readonly="readonly" value="<%=p.getId() %>"/>
   	 			</td>
   	 		</tr>
   	 		<tr>
   	 			<td>宠物姓名</td>
   	 			<td>
   	 			<input style="color:#7a7a7a" type="text" name="name" value="<%=p.getName()%>"/>
   	 			</td>
   	 		</tr>
   	 		<tr>
   	 			<td>宠物种类</td>
   	 			<td>
   	 			<input style="color:#7a7a7a" type="text" name="type" value="<%=p.getType()%>"/>
   	 			</td>
   	 		</tr>
   	 		<tr>
   	 			<td>宠物生日</td>
   	 			<td>
   	 			<input style="color:#7a7a7a" type="text" name="birthday" value="<%=p.getBirthday() %>"/>
   	 			</td>
   	 	   </tr>
   	 	   <tr>
   	 			<td>宠物主人</td>
   	 			<td>
   	 			<input style="color:#7a7a7a" type="text" name="own_name" value="<%=p.getOwn_name()%>"/>
   	 			</td>
   	 	   </tr>  	 			 		
   	 	</table>
   	 	<input type="submit" value="提交"/>&nbsp;&nbsp;
   	 	<input type="reset" value="重置"/>
   	 </form>
   	</center>
  </body>
</html>